package models

import (
	"time"
	"github.com/astaxie/beego/orm"
)

type WxMessage struct {
	Id          int
	UserId      int `ht:"list;search;name(用户编号)"`
	WxOpenId    string `ht:"list;name(用户微信编号)"`
	Content     string `ht:"list;name(消息内容)"`
	CreateTime  time.Time `ht:"list;name(消息时间)"`
	MessageType int `ht:"list;name(消息类型);subclass([{\"Num\":0,\"Name\":\"获取积分\"},{\"Num\":1,\"Name\":\"用户积分兑换\"},{\"Num\":2,\"Name\":\"商家积分兑换\"},{\"Num\":3,\"Name\":\"积分失效\"},{\"Num\":4,\"Name\":\"优惠券推送\"}])"`
}

func init() {
	orm.RegisterModel(new(WxMessage))
}
func (*WxMessage)TableName() string {
	return "wx_message"
}

func (*WxMessage) FN_Id() string {
	return "Id"
}
func (*WxMessage) FN_UserId() string {
	return "UserId"
}
func (*WxMessage) FN_WxOpenId() string {
	return "WxOpenId"
}
func (*WxMessage) FN_Content() string {
	return "Content"
}
func (*WxMessage) FN_CreateTime() string {
	return "CreateTime"
}
func (*WxMessage) FN_MessageType() string {
	return "MessageType"
}